home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-022.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  52.7 KB  |  1,451 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Fri, 20 Mar 92       Volume 1 : Issue 22
  2.  
  3. Today's Topics:
  4.  
  5.     *DESPERATELY SEEKING APPLE COMPUTER JOB*
  6.     Preference files: best way?
  7.     Async filereading only from floppy?
  8.  
  9.  
  10. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  11.  
  12. These digests are available (by using FTP, account anonymous, your email
  13. address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
  14. edu (try skinner.cs.uoregon.edu if that doesn't work).  This is also the home
  15. of the comp.sys.mac.programmer Frequently Asked Questions list.
  16.  
  17. These digests are also available via email.  Just send a note saying that you
  18. want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
  19. automatically receive each new digest as it is created.
  20.  
  21. The articles in these digests are taken directly from comp.sys.mac.programmer.
  22. They are not edited; all articles included in this digest are in their original
  23. posted form.  The only articles that are -not- included in these digests are
  24. those which didn't receive any replies (except those that give information
  25. rather than ask a question).  All replies to each article are concatenated
  26. onto the original article in the order in which they were received.  Article
  27. threads are not added to the digests until the last article added to the
  28. thread is at least one month old (this is to ensure that the thread is dead
  29. before adding it to the digests).
  30.  
  31. Send administrative mail to mkelly@cs.uoregon.edu.
  32.  
  33. -------------------------------------------------------
  34.  
  35. From: klingspo@netlab.cis.brown.edu (Steve Klingsporn)
  36. Subject: *DESPERATELY SEEKING APPLE COMPUTER JOB*
  37. Date: 1 Feb 92 09:03:01 GMT
  38. Organization: Brown University
  39.  
  40. Newsgroups: misc.jobs.wanted,misc.jobs.resumes
  41. Subject: Macintosh Programmer seeks Apple/NeXT/Other Job *NOW*
  42. Summary: 
  43. Followup-To: 
  44. Distribution: usa
  45. Keywords: 
  46.  
  47.  
  48. Steve Klingsporn
  49. 1032 Ashland Avenue
  50. Wilmette, IL  60091
  51. (708) 251-6288
  52. klingspo@greyrock.mso.colostate.edu
  53. klingspo@netlab.cis.brown.edu
  54.  
  55.  
  56. Saturday, 1 February, 1992
  57.  
  58.  
  59. To whom it may concern in Silicon Valley:
  60.  
  61. My name is Steve, and I'm a 19-year old student in Chicago.  I worked
  62. for Apple's Chicago, IL ("Riverway") Regional Sales Office (Rosemont, IL)
  63. for 2 years, beginning in May, 1989.  I'm back from my first year at school;
  64. I didn't do well -- I had other things on my mind and didn't apply myself.
  65. I can program the Macintosh in C and Pascal, and am learning C++ and MacApp
  66. right now.  I'm an average programmer when it comes to the Mac, but I'm
  67. learning and tend to generally learn everything pretty quickly.
  68.  
  69. I have this dream -- run away to California (Silicon Valley) and get a job
  70. doing *anything* at Apple or NeXT or some other cool computer company with
  71. the vision I have (Apple's).  I want to change the world, and due to my
  72. bad situation at home, I'm forced to look to move to California for a job
  73. immediately.  I am a really nice & personable guy, and work well with people.
  74. I'm a very experienced computer person, and have been programming off and on
  75. for 10 years.  I need a job.  I want to start over, so to speak.
  76.  
  77. Eventually, I will continue my higher education.  For now, I just want to
  78. get away from home -- and see what I can do in the programming, R&D,
  79. marketing world.  I'm a dreamer, but remain realistic.  I'm intelligent,
  80. and learn quickly and easily.  I can succeed.
  81.  
  82. I believe that I could be an asset to the personal computer industry, and
  83. I have references to back up this statement.  If Apple or NeXT or some
  84. other company of that sort has ANY POSITION (AA, Anything), preferrably
  85. Apple and in the PINK projet, System 7, or ATG, I would LOVE to work for you.
  86.  
  87.  
  88. I look forward to hearing from you.
  89.  
  90.  
  91. Thanks much,
  92.  
  93. Desperately,
  94.  
  95. Steve Klingsporn
  96. Macintosh Programmer
  97. (708) 251-6288
  98.  
  99.  
  100.  
  101. - -------------------------
  102.  
  103. From: rfischer@Xenon.Stanford.EDU (Ray Fischer)
  104. Subject:  *DESPERATELY SEEKING APPLE COMPUTER JOB*
  105. Date: 10 Feb 92 22:52:41 GMT
  106. Organization: Computer Science Department, Stanford University.
  107.  
  108. klingspo@netlab.cis.brown.edu (Steve Klingsporn) writes ...
  109. >Eventually, I will continue my higher education.  For now, I just want to
  110. >get away from home -- and see what I can do in the programming, R&D,
  111. >marketing world.
  112.  
  113. Well, this wasn't directed to me directly, but as someone who did the same
  114. thing 15 years ago I might add some useful comments.  I'm not now working
  115. since I returned to school to get eddikated, but I have worked as a 
  116. programmer for several years.
  117.  
  118. Good news/ Bad news.  Good first.
  119.  
  120. It can be done.  If you can demonstrate that you can produce professional
  121. quality code in an area that is useful to the company (OS, networking,
  122. compilers, tools, etc), preferably by having done it before, and convince the 
  123. right person that you can do it, you can get a job.  A better approach is 
  124. to demonstrate a useful computer-related skill, get in that way, then 
  125. move on to a programming job (which is what worked for me once).
  126.  
  127. Bad news.  Companies in general, and in particular ones such as Apple
  128. and Next, get lots of people who would like to work for them and think
  129. they can program.  As someone who's worked professionally I'd say that
  130. people WITH BS/MS degrees and no experience are not yet professional
  131. programmers, even though they know a lot about computers.  There are a 
  132. lot of people with a degree AND experience who would like to work for 
  133. Apple and are not able to because they do not have the skills Apple is 
  134. looking for.  You have neither degree or experience, thus you're in for 
  135. a difficult time.
  136.  
  137. >I believe that I could be an asset to the personal computer industry, and
  138. >I have references to back up this statement.  If Apple or NeXT or some
  139. >other company of that sort has ANY POSITION (AA, Anything), preferrably
  140. >Apple and in the PINK projet, System 7, or ATG, I would LOVE to work for you.
  141.  
  142. Apple requires (in general) an MS (preferably PhD) for people applying
  143. to the advanced technology group.  Operating systems work in general
  144. requires a BSCS minimum plus 2-5 years experience at any company.
  145.  
  146. Quick test: how familiar are you with semaphores (implementation and use),
  147. deadlock detection, disk scheduling algorithms, the difference between 
  148. tasks, processes, & threads, and 2-3 different file system structures 
  149. (like MS-DOS, Berkeley FFS, Mac B-Tree, or log-structured file systems).
  150. Know anything about IPC (inter-process communication) and RPC (remote
  151. procedure calls)?  NFS (network file systems)?
  152.  
  153. I too, would like to work for Apple.  I'll be graduating from Stanford with 
  154. an MSCS and 10 years professional experience.  This should give you some
  155. idea of the competition you're facing.
  156.  
  157. Last words (finally).  Get a degree, THEN bug Apple or Next for a job.
  158. It'll be a LOT easier, and you'll get to do MUCH more interesting things.
  159. It used to be once that getting a job without a CS degree wasn't too 
  160. much of a problem.  Not anymore.  Do NOT move here without either money
  161. or a job.  Being homeless is tough, and here you'll need $1000 a month
  162. minimum for basic living expenses.
  163.  
  164. Good Luck.
  165.  
  166. Ray
  167. rfischer@cs.stanford.edu
  168.  
  169.  
  170.  
  171. - -------------------------
  172.  
  173. From: ksand@apple.com (Kent Sandvik)
  174. Subject:  *DESPERATELY SEEKING APPLE COMPUTER JOB*
  175. Date: 13 Feb 92 20:24:41 GMT
  176. Organization: MacDTS Mongols
  177.  
  178. In article <1992Feb10.225241.6434@CSD-NewsHost.Stanford.EDU>, rfischer@Xenon.Stanford.EDU (Ray Fischer) writes:
  179. > I too, would like to work for Apple.  I'll be graduating from Stanford with 
  180. > an MSCS and 10 years professional experience.  This should give you some
  181. > idea of the competition you're facing.
  182.  
  183. > Last words (finally).  Get a degree, THEN bug Apple or Next for a job.
  184. > It'll be a LOT easier, and you'll get to do MUCH more interesting things.
  185. > It used to be once that getting a job without a CS degree wasn't too 
  186. > much of a problem.  Not anymore.  Do NOT move here without either money
  187. > or a job.  Being homeless is tough, and here you'll need $1000 a month
  188. > minimum for basic living expenses.
  189.  
  190. True. Young commercial fields are very tolerant concerning the workforce, and
  191. emerging industries which are screaming for workers will usually look at 
  192. the interest and know-how instead of educational merits. However the computing
  193. industry is already in the more stable phase, where the industry really is
  194. looking for a combination of base level education and specialized experience.
  195.  
  196. I don't think it's impossible to get a job inside any of the big computing
  197. companies without a degree; however it's hard to compete against other 
  198. prospects who have a professional title. I've been involved in hiring DTS engineers, and
  199. yes we are not that strict about the right school and right degree. However
  200. if someone shows that he has taken the time and energy to spend at least 
  201. 4 years in college, and has a degree, it gives the employer a hint about long term 
  202. planning, interest and responsibility. And a CS or EE degree certainly shows that. 
  203.  
  204. One final hint, specializing into a particular area (compilers, OS systems,
  205. OOP design, graphics...) always makes it easier to get the right job.
  206.  
  207.  
  208. Kent Sandvik/DTS
  209. ..yes, he spent 4 years in college, and lived on crisp-bread...
  210.  
  211.  
  212.  
  213. - -------------------------
  214.  
  215. From: ostroff@Oswego.EDU (Boyd Ostroff)
  216. Subject:  *DESPERATELY SEEKING APPLE COMPUTER JOB*
  217. Date: 19 Feb 92 00:28:26 GMT
  218. Organization: Instructional Computing Center, SUNY at Oswego, Oswego, NY
  219.  
  220. In article <1992Feb10.225241.6434@CSD-NewsHost.Stanford.EDU>, rfischer@Xenon.Stanford.EDU (Ray Fischer) writes:
  221. > Not anymore.  Do NOT move here without either money
  222. > or a job.  Being homeless is tough, and here you'll need $1000 a month
  223. > minimum for basic living expenses.
  224.  
  225.     "California is a garden of Eden,
  226.     a paradise to live in or to see.
  227.     But believe it or not,
  228.     you won't find it so hot
  229.     if you ain't got that do-re-mi!"
  230.  
  231. (Excerpt from the song "Do-Re-Mi" by Woody Guthrie :-)
  232.  
  233. .............................................................................
  234. ....Boyd Ostroff / Technical Director / SUNY Oswego Department of Theatre....
  235. ...............Voice: (315) 341-2987 /  Fax: (315) 341-3394..................
  236. ..............ostroff@oswego.oswego.edu / ostroff@cboard.UUCP................
  237.  
  238.  
  239.  
  240. - -------------------------
  241.  
  242. From: mathew@mantis.co.uk (From A to B)
  243. Subject:  *DESPERATELY SEEKING APPLE COMPUTER JOB*
  244. Date: 19 Feb 92 13:47:23 GMT
  245. Organization: Mantis Consultants, Cambridge. UK.
  246.  
  247. ksand@apple.com (Kent Sandvik) writes:
  248. > In article <1992Feb10.225241.6434@CSD-NewsHost.Stanford.EDU>, rfischer@Xenon.
  249. > > I too, would like to work for Apple. [...]
  250. > > It used to be once that getting a job without a CS degree wasn't too 
  251. > > much of a problem.
  252. >                                                         However the computing
  253. > industry is already in the more stable phase, where the industry really is
  254. > looking for a combination of base level education and specialized experience.
  255.  
  256. Yeah.  If you want to work for Apple, you're probably best off doing a Law
  257. degree.
  258.  
  259. Hehehe.
  260.  
  261.  
  262. mathew
  263.  
  264. -- 
  265. Hail Eris! / "Our whole economy's based on fear and death; how long can we get
  266. away with this?" --- Jello Biafra / Message for Kodak: Bring back Dan Bredy! /
  267. PGP RSA public key available on request / Desperately seeking Negativland's U2
  268. CD / Just another would-be Mac owner put off by Apple's monopolistic practices
  269.  
  270.  
  271.  
  272. ---------------------------
  273.  
  274. From: cent@u.washington.edu  (Bob Cent)
  275. Subject: Preference files: best way?
  276. Organization: University of Washington
  277. Date: Tue, 4 Feb 1992 01:34:41 GMT
  278.  
  279. Greetings,
  280.  
  281. I have the need to open and save preference files from my application.  Is
  282. there an ideal way to deal with this special kind of file?  My searching has
  283. revealed no discussion about it.
  284.  
  285.  
  286. Thanks.
  287.  
  288. Bob Cent, Engineering Technician
  289. cent@u.washington.edu
  290. Seattle, Washington
  291.  
  292.  
  293.  
  294.  
  295.  
  296. - -------------------------
  297.  
  298. From: mcmath@csb1.nlm.nih.gov (Chuck McMath)
  299. Subject:  Preference files: best way?
  300. Date: 4 Feb 92 13:38:03 GMT
  301. Organization: MSD
  302.  
  303. In article <1992Feb4.013441.22490@milton.u.washington.edu>, cent@u.washington.edu (Bob Cent) writes:
  304. > Greetings,
  305. > I have the need to open and save preference files from my application.  Is
  306. > there an ideal way to deal with this special kind of file?  My searching has
  307. > revealed no discussion about it.
  308. > Thanks.
  309. > Bob Cent, Engineering Technician
  310. > cent@u.washington.edu
  311. > Seattle, Washington
  312.  
  313. IMHO, the best way to deal with this is to put your preference file in a folder
  314. inside the System Folder - the folder should be called Preferences.  This
  315. is the approach taken by System 7 - my system has a 'Preferences' folder, and
  316. it even has a nifty little special folder icon.  You can do the same thing
  317. under System 6 without any problems.
  318.  
  319. There are documented ways to find out the vRefNum of the System Folder, and
  320. taking it from there is pretty easy, no?
  321.  
  322. --chuck mcmath--
  323. mcmath@csb1.nlm.nih.gov
  324. this is where your tax dollars are going - thanks for your support!
  325.  
  326.  
  327.  
  328. - -------------------------
  329.  
  330. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  331. Subject:  Preference files: best way?
  332. Date: 5 Feb 92 00:05:38 GMT
  333. Organization: Integrated Systems Laboratory, ETH, Zurich
  334.  
  335. In article <1992Feb4.133803.2067@nlm.nih.gov> mcmath@csb1.nlm.nih.gov (Chuck McMath) writes:
  336. >In article <1992Feb4.013441.22490@milton.u.washington.edu>, cent@u.washington.edu (Bob Cent) writes:
  337. >> I have the need to open and save preference files from my application.  Is
  338. >> there an ideal way to deal with this special kind of file?  My searching has
  339. >> revealed no discussion about it.
  340. >IMHO, the best way to deal with this is to put your preference file in a folder
  341. >inside the System Folder - the folder should be called Preferences.  This
  342. >is the approach taken by System 7 - my system has a 'Preferences' folder, and
  343. >it even has a nifty little special folder icon.  You can do the same thing
  344. >under System 6 without any problems.
  345. >
  346. >There are documented ways to find out the vRefNum of the System Folder, and
  347. >taking it from there is pretty easy, no?
  348.  
  349. If you have a new enough version of MPW, there is an even simpler solution:
  350. Call the System 7 function FindFolder. MPW has glue code that will return the
  351. Preferences folder under System 7 and the System Folder under System 6. While
  352. the latter might be somewhat questionable, I find it very convenient to just
  353. call one function.
  354.  
  355. Matthias
  356.  
  357. - ---
  358. Matthias Neeracher                                      neeri@iis.ethz.ch
  359.  `We say "gestalt" when things combine to act in ways we can't explain'
  360.                              -- Marvin Minsky, _The Society Of Mind_
  361.  
  362.  
  363.  
  364. - -------------------------
  365.  
  366. From: colin@Cayman.COM (Colin "Atilla" Steele)
  367. Subject:  Preference files: best way?
  368. Date: 4 Feb 92 23:14:11 GMT
  369. Organization: Cayman Systems Inc., Cambridge, MA
  370.  
  371. I have had some limited experience with this, so, for what it's worth:
  372.  
  373. You need to decide what the preferences are, how they will be used,
  374. and if they will change in size, format, or character in future
  375. verisons.  Next, you've got to figure out what is the best way to
  376. store them.  Sounds easy, right?  Well, lemme toss out a couple of
  377. ideas.  First, you could associate a special "key" with each option,
  378. one that uniquely identifies it.  Part of the key, or somehow
  379. associated with the key, could be a length.  These key-length-option
  380. units could be hierarchical, if your design demanded it.  Or, let's
  381. try something simpler.  You could store options in a text format that,
  382. if need be, the user or tech support rep could look at with any text
  383. editor, and figure out what's going on.
  384.  
  385. I would suggest creating a special service, say, a "Preferences
  386. Manager," that would hide all of the grody low-level details from the
  387. rest of your system.  Your system just says "gimmie such-and-such a
  388. preference," and the P.M. coughs it up in some standard format.  The
  389. interfaces between the system and the PM and the PM and the file
  390. itself can be as simple or complicated as you want.
  391.  
  392. Just a few ramblings...
  393. --
  394.  
  395.  
  396. - ----------------------------------------------------------------------------
  397.  Colin Steele     | Cayman Systems, 26 Landsdowne St., Cambridge, MA 02139
  398.  colin@cayman.com | (617) 494-1916 x209 | applelink D0523 | Fax (617) 494-9270
  399.  
  400.  
  401.  
  402. - -------------------------
  403.  
  404. From: mjeffery@reed.edu (Mark Jefferys)
  405. Subject:  Preference files: best way?
  406. Date: 5 Feb 92 00:49:12 GMT
  407. Organization: Reed College, Portland, OR
  408.  
  409. In article <COLIN.92Feb4181411@wrangel.Cayman.COM> colin@Cayman.COM (Colin  
  410. "Atilla" Steele) writes:
  411. % I have had some limited experience with this, so, for what it's worth:
  412.  
  413. % I would suggest creating a special service, say, a "Preferences
  414. % Manager," that would hide all of the grody low-level details from the
  415. % rest of your system.  Your system just says "gimmie such-and-such a
  416. % preference," and the P.M. coughs it up in some standard format.  The
  417. % interfaces between the system and the PM and the PM and the file
  418. % itself can be as simple or complicated as you want.
  419.  
  420. Sounds like a NeXT.
  421.  
  422. Its problem is that the Defaults Database (on the NeXT) will be corrupted  
  423. occasionally, causing the user to lose *all* of his preferences for *all*  
  424. of his programs.
  425.  
  426. The Desktop Database (on the Mac) has a smaller problem, since most of the  
  427. info can be recovered. (Except comments).
  428.  
  429.  
  430. %  Colin Steele     | Cayman Systems, 26 Landsdowne St., Cambridge, MA  
  431. 02139
  432. %  colin@cayman.com | (617) 494-1916 x209 | applelink D0523 | Fax (617)  
  433. 494-9270
  434.  
  435. --
  436. Mark Jefferys        Internet: mjeffery@reed.edu
  437.  
  438.  
  439.  
  440. - -------------------------
  441.  
  442. From: dorner@pequod.cso.uiuc.edu (Steve Dorner)
  443. Subject:  Preference files: best way?
  444. Organization: University of Illinois at Urbana-Champaign
  445. Date: Wed, 5 Feb 1992 18:53:43 GMT
  446.  
  447. mjeffery@reed.edu writes:
  448. >Its problem is that the Defaults Database (on the NeXT) will be corrupted  
  449. >occasionally, causing the user to lose *all* of his preferences for *all*  
  450. >of his programs.
  451.  
  452. I've been using my NeXT 8 hours a day for over 3 years (yes, I had one
  453. of the first production models).  I've lost my defaults database perhaps
  454. twice.
  455.  
  456. If you do regular backups, you don't have to worry so much about losing
  457. a few preferences.  If you don't do regular backups, losing a few
  458. preferences is just about the last thing you should be worrying about.
  459.  
  460. -- 
  461. Steve Dorner, U of Illinois Computing Services Office
  462. Internet: s-dorner@uiuc.edu  UUCP: uunet!uiucuxc!uiuc.edu!s-dorner
  463. Apparently-To: does more harm than good.
  464.  
  465.  
  466.  
  467.  
  468. - -------------------------
  469.  
  470. From: francis@dogwood.atl.ga.us (John Stracke)
  471. Subject:  Preference files: best way?
  472. Date: 6 Feb 92 21:49:37 GMT
  473. Organization: National Science Center Foundation
  474.  
  475. In article <COLIN.92Feb4181411@wrangel.Cayman.COM> colin@Cayman.COM (Colin "Atilla" Steele) writes:
  476.  
  477.    You need to decide what the preferences are, how they will be used,
  478.    and if they will change in size, format, or character in future
  479.    verisons.  Next, you've got to figure out what is the best way to
  480.    store them.  Sounds easy, right?  Well, lemme toss out a couple of
  481.  
  482. Resources.  That way, you can store the default values in your
  483. application, and saying "GetResource(...)" will fetch from the
  484. preferences file if it's in there, or from your app otherwise.  This
  485. also lets your user edit the app's resources to change the defaults.
  486.  
  487. /===========================================================================\
  488. |John (Francis) Stracke         |My opinions are my own. | No matter how    |
  489. |Natl. Science Center Foundation|========================/ subtle the       |
  490. |Augusta, GA                    |wizard, a knife between the shoulderblades |
  491. |francis@dogwood.atl.ga.us      |  will seriously cramp his style.          |
  492. \===========================================================================/
  493. (Formerly francis@zaphod.uchicago.edu)
  494. --
  495. -- 
  496.  
  497.  
  498.  
  499. - -------------------------
  500.  
  501. From: bx5x@vax5.cit.cornell.edu
  502. Subject:  Preference files: best way?
  503. Date: 8 Feb 92 00:50:37 EST
  504. Organization: Cornell University
  505.  
  506. In article <FRANCIS.92Feb6164930@Galois.dogwood.atl.ga.us>,
  507. francis@dogwood.atl.ga.us (John Stracke) writes: 
  508. > Resources.  That way, you can store the default values in your
  509. > application, and saying "GetResource(...)" will fetch from the
  510. > preferences file if it's in there, or from your app otherwise.  This
  511. > also lets your user edit the app's resources to change the defaults.
  512. Actually, this is not a good idea.  If your program is on a server on a
  513. network, and you don't have write privileges to that server, your program
  514. will not be able to change its preferences resources, and will be obnoxious.
  515.  
  516. It is a much better idea to create a prefs file in the system folder, since
  517. then each user will have their own prefs file on their own machines, and
  518. all will be happy.
  519.  
  520. Under system 7, of course, you should use the Preferences folder.
  521. WARNING- under international versions of the system, the folder is probably
  522. not called "Preferences" but something else, depending on the language.  Use
  523. the Folder Manager routines.  Your compiler should have the glue that gets
  524. it to work right under any system.
  525.  
  526. Good luck.
  527. -- 
  528.  
  529. - -(0000000000000000000000000000000000000000000000000000000000000000000000)---
  530.  ()00   Dave "Rasferet" Blumenthal   <aka>   bx5x@vax5.cit.cornell.edu   00()
  531. ______________________________________________________________________________
  532. I have something to say - | If it works right the  |  #1 Least Desired
  533. It is better to burn out  | first time, then the   |    New Car Option:
  534. than to fade away.        | documentation is wrong.|
  535.  -Kiergan, The Highlander |           -Me          |  Intermittent Steering
  536. ______________________________________________________________________________
  537.       ** I'm a .sig virus.  Attach me to your .sig!  Help me spread!  **
  538.  
  539.  
  540.  
  541.  
  542. - -------------------------
  543.  
  544. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  545. Subject: Want a preferences-file object? (was Re: Preference files: best way?)
  546. Organization: Kalamazoo College
  547. Date: Sat, 8 Feb 1992 19:57:10 GMT
  548.  
  549. bx5x@vax5.cit.cornell.edu writes:
  550. >
  551. >It is a much better idea to create a prefs file in the system folder, since
  552. >then each user will have their own prefs file on their own machines, and
  553. >all will be happy.
  554. >
  555. >Under system 7, of course, you should use the Preferences folder.
  556. >WARNING- under international versions of the system, the folder is probably
  557. >not called "Preferences" but something else, depending on the language.  Use
  558. >the Folder Manager routines.  Your compiler should have the glue that gets
  559. >it to work right under any system.
  560.  
  561. I've written a THINK C 5 object that allows for quick'n'easy
  562. implementation of preferences.  It looks for a resource (default 'PREF',
  563. #128, but changeable) with the information you want, in a file (default
  564. name 'AppName Preferences' but very changeable) that's located in the
  565. Preferences folder in the System folder.  It will optionally look in the
  566. application's folder as well.  It will use FindFolder to get the
  567. Preferences folder under 7, and low-level routines to find and/or create
  568. it under 6.  You need to subclass a few things, but it'll take care of
  569. everything from reading and writing the preferences upon request, to
  570. creating the default prefs file if it's not there.
  571.  
  572. I've had a lot of success using it in conjunction with ResEdit
  573. TeMPLates.  Average turnaround time from thinking "gee, I need another
  574. preferences variable here" to actually having it in the program was
  575. about a minute, not including recompiling.
  576.  
  577. This object _does_ require the TCL, because it subclasses off of
  578. CResFile.  Theoretically, you could get by if you're using just
  579. CApplication and the CFile hierarchy, but I wouldn't swear to it.
  580. It also uses exceptions.
  581.  
  582. Anyway, I hereby offer it publicly.  Mail me if you want it.
  583.  
  584. >      ** I'm a .sig virus.  Attach me to your .sig!  Help me spread!  **
  585.  
  586. Who started this whole sig virus thing, anyway!?
  587. -- 
  588.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  589.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  590.  
  591.  
  592.  
  593. - -------------------------
  594.  
  595. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  596. Subject:  Preference files: best way?
  597. Date: 8 Feb 92 20:47:23 GMT
  598. Organization: Royal Institute of Technology, Stockholm, Sweden
  599.  
  600. > bx5x@vax5.cit.cornell.edu writes:
  601.  
  602.    > Resources.  That way, you can store the default values in your
  603.    > application, and saying "GetResource(...)" will fetch from the
  604.    > preferences file if it's in there, or from your app otherwise.  This
  605.    > also lets your user edit the app's resources to change the defaults.
  606.  
  607.    Actually, this is not a good idea.  If your program is on a server on a
  608.    network, and you don't have write privileges to that server, your program
  609.    will not be able to change its preferences resources, and will be obnoxious.
  610.  
  611. No, I think the original author was pointing out agood way of
  612. structuring the program; there was no doubt about the resources
  613. being stored in a preferences file locally, but the DEFAULTS are
  614. stored in the application, so that an empty preferences file can
  615. be filled with decent values. THOSE values may be editted using
  616. resedit in the app, either directly or using cut&paste from a
  617. suitable preferences file.
  618.  
  619. --
  620. This Signature is distributed under the conditions of the Signature License,
  621. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  622. implies that you accept to be bound by the terms in said License. Should you
  623. not agree on any of these terms, you must return the Signature unread to me.
  624.  
  625.  
  626.  
  627. - -------------------------
  628.  
  629. From: ross@bnr.ca (Ross Brown)
  630. Subject:  Preference files: best way?
  631. Organization: Bell-Northern Research
  632. Date: Mon, 10 Feb 92 15:57:26 GMT
  633.  
  634. In article <D88-JWA.92Feb8214723@hemul.nada.kth.se> d88-jwa@hemul.nada.kth.se
  635. (Jon W{tte) writes:
  636. >> bx5x@vax5.cit.cornell.edu writes:
  637. >
  638. >   > Resources.  That way, you can store the default values in your
  639. >   > application, and saying "GetResource(...)" will fetch from the
  640. >   > preferences file if it's in there, or from your app otherwise.  This
  641. >   > also lets your user edit the app's resources to change the defaults.
  642. >
  643. >   Actually, this is not a good idea.  If your program is on a server on a
  644. >   network, and you don't have write privileges to that server, your program
  645. >   will not be able to change its preferences resources, and will be
  646. obnoxious.
  647. >
  648. >No, I think the original author was pointing out agood way of
  649. >structuring the program; there was no doubt about the resources
  650. >being stored in a preferences file locally, but the DEFAULTS are
  651. >stored in the application, so that an empty preferences file can
  652. >be filled with decent values. THOSE values may be editted using
  653. >resedit in the app, either directly or using cut&paste from a
  654. >suitable preferences file.
  655.  
  656. Here's the way I do preferences:  My preference dialogs have four buttons,
  657. Cancel, Use Defaults, Make Defaults, and OK.  The preferences are stored in
  658. resources in the preferences file, and the defaults for those preferences are
  659. stored in a single resource in the application file.  This "default" resource
  660. is initially absent, so the program supplies "factory defaults".  When the user
  661. clicks on Make Defaults, the "default" resource is created or updated.  Use
  662. Defaults reverts to those settings.  Option + Use Defaults reverts to the
  663. "factory defaults".  If the application resource fork is unwritable, the Make
  664. Defaults box is grayed out.  This way, site administrators can override the
  665. defaults I impose, and protect them from users if desired.  Users are still
  666. free to override the site defaults on a case-by-case basis.
  667.  
  668. Ross Brown
  669. Bell-Northern Research Ltd.
  670. Ottawa, Ontario, Canada
  671. ross@bnr.ca
  672. Opinions expressed do not necessarily represent those of BNR.
  673.  
  674.  
  675.  
  676. - -------------------------
  677.  
  678. From: brunner@brchh87.bnr.ca (James Brunner)
  679. Subject:  Want a preferences-file object? (was Re: Preference files: best way?)
  680. Date: 19 Feb 92 18:13:40 GMT
  681.  
  682. Jamie, I can't seem to E-mail to you.  But I for one am interested in
  683. a preferences file class.  Could you please E-mail to me or post.
  684.  
  685. By the way, here's my contribution.  The CObject class has an error that
  686. you'll probably never hit, but here it is.  In the routine that returns the
  687. name of a class, they truncate the length to 256 to fit into a Str255
  688. variable.  Like this (from memory so the names may be different):
  689.      length = Min(length,sizeof(Str255));
  690. This should be
  691.      length = Min(length,sizeof(Str255)-1);
  692. or
  693.      length = Min(length,255);
  694.  
  695. (Of course the sizeof a Str255 is 256 because of the addition of the length
  696. byte).
  697. -- 
  698. - -------------------------------------------------------------------------
  699. Jim Brunner - (brunner@brchh87.BNR.CA)
  700. All opinions are my own and have nothing whatsoever to do with BNR, NT,
  701. NTI, Bell Canada, or any of the BCE corporations or affiliates.
  702.  
  703.  
  704.  
  705. ---------------------------
  706.  
  707. From: ollef@sics.se (Olle Furberg)
  708. Subject: Async filereading only from floppy?
  709. Date: 2 Feb 92 19:37:21 GMT
  710. Organization: Satellite Image in Kiruna Corporation
  711.  
  712.  
  713. Does anybody have any experience with async filereading?
  714.  
  715. I open the file by PBOpen and then I start reading from
  716. it by PBRead. While it is reading I try to do a small loop
  717. until the reading is done. If the file I'm reading is on a 
  718. floppy, the program execution willcontinue under the reading,
  719. but this does not work if the file is on HardDisk (or on a CD).
  720.  
  721. What am I missing? Isn't it possible to use async filereading reading
  722. with a SCSI?
  723.  
  724. I'm enclosing the code.
  725.  
  726.  
  727.    /Olle
  728.  
  729.  
  730.  
  731. /*
  732.  * Must include an ALRT resource id=1, with a DITL containing
  733.  * one editText item with an ^1, and an OK-button.
  734.  */
  735.  
  736. #define NIL 0L
  737. #define STILL_READING 1
  738. #define FALSE 0
  739. #define TRUE 1
  740.  
  741. #include<Types.h>
  742.  
  743. void ShowError(char *errorstring);
  744. void ToolBoxInit(void);
  745. int ReadFile(void);
  746.  
  747.  
  748. main(){
  749.     ToolBoxInit();
  750.     while(ReadFile());
  751. }
  752.  
  753. ReadFile(){
  754.  
  755.     Point mypoint;
  756.     SFReply replyrec;
  757.     IOParam pb;
  758.     char mystring[100];
  759.     unsigned long int temp =0;
  760.     
  761.     mypoint.h = 20; mypoint.v = 20;
  762.     SFGetFile ( mypoint, NIL, NIL, -1, NIL, NIL, &replyrec );
  763.     if (!replyrec.good) return 0; /* Return and exit from appl */
  764.     
  765.     /* Initialize pb for PBOpen */
  766.     pb.ioCompletion = NIL;
  767.     pb.ioNamePtr = replyrec.fName;
  768.     pb.ioVRefNum = replyrec.vRefNum;
  769.     pb.ioVersNum = 0;
  770.     pb.ioPermssn = fsRdPerm;
  771.     pb.ioMisc = NIL;
  772.     
  773.     PBOpen((ParmBlkPtr) &pb,TRUE);
  774.     
  775.     /* Check for error in PBOpen */
  776.     if (pb.ioResult != 0){
  777.         sprintf(mystring,"Error %d while trying to open file",pb.ioResult);
  778.         ShowError(CtoPstr(mystring));
  779.     }
  780.  
  781.     /* Put file length into pb.ioMisc */
  782.     PBGetEOF ( (ParmBlkPtr) &pb, FALSE );
  783.  
  784.     sprintf(mystring,"File length = %ld", (long int)pb.ioMisc);
  785.     ShowError(CtoPstr(mystring));
  786.     
  787.     /* Initialize pb for PBRead */
  788.     pb.ioReqCount = (long int) pb.ioMisc;
  789.     pb.ioPosMode = fsFromStart;
  790.     pb.ioPosOffset = 0;
  791.  
  792.     /* No completion function, we check the pb.ioResult instead */
  793.     pb.ioCompletion = NIL;
  794.     
  795.     /* Allocate memory for buffer */
  796.     pb.ioBuffer = NewPtr((unsigned long int) pb.ioMisc);
  797.     if (pb.ioBuffer==NIL) {
  798.         ShowError("\pNot enough memory for buffert");
  799.         return 1; /* Exit if not enough memory */
  800.     }
  801.         
  802.     /* Start reading async */
  803.  
  804.     PBRead((ParmBlkPtr) &pb,TRUE);
  805.     
  806.     /* Do do something else until I/O has terminated */
  807.     for (temp=0; pb.ioResult == STILL_READING;){
  808.         temp++;
  809.     }
  810.     
  811.     
  812.     /* Check for error */
  813.     if (pb.ioResult != 0){
  814.         sprintf(mystring,"Error %d in IO",pb.ioResult);
  815.         ShowError(CtoPstr(mystring));
  816.     }
  817.     
  818.     /* Display result */
  819.     sprintf(mystring,"Did %lu loops, Read %lu bytes.",temp,pb.ioActCount);
  820.     ShowError((char *)CtoPstr(mystring));
  821.     
  822.     /* Close file, deallocate memory */
  823.     PBClose((ParmBlkPtr) &pb,TRUE);
  824.     DisposPtr(pb.ioBuffer);
  825.     return 1;
  826.     
  827. }
  828.  
  829.     
  830.     
  831. void ShowError(char *errorstring){
  832.     ParamText((ConstStr255Param) errorstring,(ConstStr255Param)"\p",(ConstStr255Param)"\p",(ConstStr255Param)"\p");
  833.     Alert(1,NIL);
  834.     }
  835.  
  836. void ToolBoxInit(){
  837.     /* A couple of inits */
  838.     InitGraf(&thePort);
  839.     InitFonts();
  840.     FlushEvents( everyEvent, 0 );
  841.     InitWindows();
  842.     InitMenus();
  843.     TEInit();
  844.     InitDialogs(0L);
  845.     InitCursor();
  846.     MaxApplZone();
  847. }
  848.  
  849.  
  850.  
  851. - ----------------------------------------------------------
  852. Olle Furberg                       Internet: ollef@sics.se
  853. Satellitbild in Kiruna             Phone: +46 980 121 40
  854. Swedish Space Corporation          Fax:   +46 980 160 44
  855.                                    Home:  +46 980 801 95
  856.  
  857.  
  858.  
  859. - -------------------------
  860.  
  861. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  862. Subject:  Async filereading only from floppy?
  863. Organization: Integrated Systems Laboratory, ETH, Zurich
  864. Date: 5 Feb 92 13:28:22
  865.  
  866. In article <1992Feb2.193721.29836@sics.se> ollef@sics.se (Olle Furberg) writes:
  867. >Does anybody have any experience with async filereading?
  868. >
  869. >I open the file by PBOpen and then I start reading from
  870. >it by PBRead. While it is reading I try to do a small loop
  871. >until the reading is done. If the file I'm reading is on a 
  872. >floppy, the program execution willcontinue under the reading,
  873. >but this does not work if the file is on HardDisk (or on a CD).
  874. >
  875. >What am I missing? Isn't it possible to use async filereading reading
  876. >with a SCSI?
  877.  
  878. No. The current SCSI manager executes all calls synchronously.
  879.  
  880. Matthias
  881.  
  882. - ---
  883. Matthias Neeracher                                      neeri@iis.ethz.ch
  884.  `We say "gestalt" when things combine to act in ways we can't explain'
  885.                              -- Marvin Minsky, _The Society Of Mind_
  886.  
  887.  
  888.  
  889. - -------------------------
  890.  
  891. From: stevec@Apple.COM (Steve Christensen)
  892. Subject:  Async filereading only from floppy?
  893. Date: 8 Feb 92 05:16:23 GMT
  894. Organization: Apple Computer Inc., Cupertino, CA
  895.  
  896. ollef@sics.se (Olle Furberg) writes:
  897.  
  898. >What am I missing? Isn't it possible to use async filereading reading
  899. >with a SCSI?
  900.  
  901. No.  The SCSI Manager is purely synchronous.
  902.  
  903. steve
  904. -- 
  905. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  906.   Steve Christensen            Never hit a man with glasses.
  907.   stevec@apple.com            Hit him with a baseball bat.
  908.  
  909.  
  910.  
  911. - -------------------------
  912.  
  913. From: oster@well.sf.ca.us (David Phillip Oster)
  914. Subject:  Async filereading only from floppy?
  915. Date: 13 Feb 92 13:27:16 GMT
  916. Organization: Whole Earth 'Lectronic Link, Sausalito, CA
  917.  
  918. In article <62584@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes:
  919. >No.  The SCSI Manager is purely synchronous.
  920. I timed this as recently as System 6.04, amd at that time, if
  921. you called PBRead on a SCSI device asynchronously, PBRead blocked until the 
  922. read was complete, called your completion routine, then returned to its caller.
  923.  
  924. On the other hand, the floppy driver worked correctly: PBRead() returned
  925. almost immedialtely, and your completion routine was called by the system
  926. some time later, when the data actually arrived.
  927.  
  928. When will this be fixed? It is ludicrous that the original Mac team in '83
  929. could write better drivers (the original floppy code) than everyone who has
  930. who has come and gone at apple since then.
  931.  
  932. Machines like the Mac FX have a DMA controller chip that could work
  933. very nicely with async PBRead()s to move the data without loading the
  934. main CPU. The last documentation I saw says that only AUX uses it.
  935.  
  936. You read the article on "Futures" in the Summer '91 issue of Develop
  937. magazine I want to be able to use the same techniques with reading
  938. disk files: i.e., I want to schedule a read as early as possible, and keep
  939. processing, to overlap processing with disk i/o, only blocking on the disk
  940. when there isn't anything else to do.
  941. -- 
  942. -- David Phillip Oster - At least the government doesn't make death worse.
  943. -- oster@well.sf.ca.us = {backbone}!well!oster
  944.  
  945.  
  946.  
  947. - -------------------------
  948.  
  949. From: mxmora@unix.SRI.COM (Matt Mora)
  950. Subject:  Async filereading only from floppy?
  951. Date: 13 Feb 92 20:28:22 GMT
  952. Organization: SRI International, Menlo Park, CA
  953.  
  954. In article <29996@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes:
  955. >In article <62584@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes:
  956. >>No.  The SCSI Manager is purely synchronous.
  957. >
  958. >When will this be fixed? It is ludicrous that the original Mac team in '83
  959. >could write better drivers (the original floppy code) than everyone who has
  960. >who has come and gone at apple since then.
  961.  
  962. I seen at MacWorld Expo in SF a company who apperently rewrote the scsi
  963. manager to make it async. They have a program called Scsi Directory 2.0 
  964. that can be used on any hard disk to replace the drivers. The company is
  965. called Loviel and is in NY. They were showing there hard RAID system.
  966. where you can actually replace a harddisk while the computer is still
  967. using (actually reading and writing to it) the RAID disk and plug a new one
  968. in without any data loss.
  969.  
  970. It was truely amazing but its cost was also. If they figured out how to do it
  971. maybe apple can license the software (or in apples case buy the company).
  972.  
  973. Matt
  974.  
  975. -- 
  976. ___________________________________________________________
  977. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  978. SRI International           |  my unix  mxmora@unix.sri.com
  979. ___________________________________________________________
  980.  
  981.  
  982.  
  983. - -------------------------
  984.  
  985. From: mxmora@unix.SRI.COM (Matt Mora)
  986. Subject:  Async filereading only from floppy?
  987. Date: 13 Feb 92 21:32:02 GMT
  988. Organization: SRI International, Menlo Park, CA
  989.  
  990. In article <32471@unix.SRI.COM> mxmora@unix.sri.com (Matt Mora) writes:
  991. >In article <29996@well.sf.ca.us> oster@well.sf.ca.us (David Phillip Oster) writes:
  992. >>In article <62584@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes:
  993. >>>No.  The SCSI Manager is purely synchronous.
  994. >>
  995. >>When will this be fixed? It is ludicrous that the original Mac team in '83
  996. >>could write better drivers (the original floppy code) than everyone who has
  997. >>who has come and gone at apple since then.
  998. >
  999. >I seen at MacWorld Expo in SF a company who apperently rewrote the scsi
  1000. >manager to make it async. They have a program called Scsi Directory 2.0 
  1001. >that can be used on any hard disk to replace the drivers. The company is
  1002. >called Loviel and is in NY. They were showing there hard RAID system.
  1003. >where you can actually replace a harddisk while the computer is still
  1004. >using (actually reading and writing to it) the RAID disk and plug a new one
  1005. >in without any data loss.
  1006. >
  1007. >It was truely amazing but its cost was also. If they figured out how to do it
  1008. >maybe apple can license the software (or in apples case buy the company).
  1009.  
  1010. Sorry to follow up my own post but I installed an apperently old
  1011. version of SCSI director 1.8.9 and these were the results of the speed
  1012. test. Now it claims that it does a async read and write but who knows?
  1013.  
  1014. - -
  1015.  
  1016. [START OF FILE]
  1017. SCSI Storage Device Analyzer v1.4
  1018. Read the documentation to properly interpret these results!
  1019. DO NOT BE MISLEAD BY WHAT YOU ASSUME THE PURPOSE OF THE TESTS ARE!
  1020.  
  1021. Test suite run on 1992.02.13 at 13:17:07
  1022.  
  1023. ==============
  1024. REPORT SUMMARY
  1025. ==============
  1026. (Remember that RAM Cache settings affect these timings, note your setting!)
  1027. Device Reported Vendor ID:  'QUANTUM'
  1028. Device Reported Product ID: 'Q250  76-45004'
  1029. Device Reported Firmware:   '70'
  1030.  
  1031. SCSI ID:    0
  1032. Device Reported Size:        41 MB
  1033.  
  1034. Machine:    6, Macintosh ][
  1035. Processor:  3, 68020
  1036.  
  1037. (Note that speeds of 0.00 indicate a suitable number could not be found.)
  1038. Maximum read speed of device is 604.33 KB/Second.
  1039. Maximum read speed test: SCSI MANAGER, Inner Rings Read Test
  1040.  
  1041. (Note that write testing is sometimes disabled by the user.)
  1042. Maximum write speed of device is 0.00 KB/Second.
  1043. Maximum write speed test: 
  1044.  
  1045.     NOTE THAT THESE SEEK TIMES REPRESENT THE TIME TAKEN TO RECEIVE SEEK COMMAND
  1046. COMPLETE MESSAGES.  THE DEVICE MAY NOT ACTUALLY DO ANY PHYSICAL ACTION, LIKE
  1047. MOVING HEADS, SO THE TIME MAY BE ZERO!  EVEN WHEN THE TIME IS NOT ZERO, THESE
  1048. SEEK TIMES DO NOT EVER REPRESENT AVERAGE TRACK-TO-TRACK SEEKING.  THESE SEEK
  1049. TESTS SIMPLY MEASURE THE TIME IT TAKES TO EXECUTE SCSI EXTENDED SEEK COMMANDS
  1050. VARIOUS WAYS.  THE REASON PROGRAMS CANNOT REPORT TRACK ACCESS TIMES IS BECAUSE
  1051. THERE ARE NOT ANY STANDARD SCSI COMMANDS TO ACCESS TRACKS.
  1052.   TO AVOID REDUNDENT TYPING, KEEP IN MIND THAT UNLESS MENTIONED ALL READINGS IN
  1053. THIS DOCUMENT ARE SCSI TIMINGS AND NOT MAC OS TIMINGS. THEREFORE, UNLESS
  1054. USING THIS UTILITY, THE TIMES MIGHT NOT HAVE MUCH BEARING ON NORMAL COMPUTER
  1055. USEAGE.
  1056.  
  1057. Average Sequential Seek Time:       8.08 milliseconds (ms)
  1058. Average Butterfly Seek Time:       22.73 milliseconds (ms)
  1059. Average Pattern Seek Time:         15.07 milliseconds (ms)
  1060. Outer To Inner Rings Seek Time:    42.80 milliseconds (ms)
  1061.  
  1062.  
  1063.  
  1064. =========================
  1065. TESTS THAT WERE SELECTED
  1066. =========================
  1067. Seek
  1068. SCSI Manager
  1069. SCSI Driver
  1070. Mac OS
  1071.  
  1072.  
  1073. ============================
  1074. OTHER SYSTEM CHARACTERISTICS
  1075. ============================
  1076. System:       7.0
  1077. Appletalk:    57
  1078. FPU Type:     1, 68881
  1079. MMU Type:     2, 68851
  1080. Physical RAM: 8388608 bytes
  1081. Logical RAM:  8388608 bytes
  1082. Quickdraw:    2.48
  1083. ROM:          262144
  1084. ROM Version:  376
  1085. Virtual:      CAPABLE
  1086. Port A:       IN USE
  1087. Port B:       FREE
  1088. Printer Name: 'LaserWriter'
  1089. Chooser Name: 'Matthew Xavier Mora'
  1090.  
  1091. System Extensions
  1092. - ---------------
  1093.  
  1094.  
  1095. ===========================
  1096. SCSI DEVICE CHARACTERISTICS
  1097. ===========================
  1098. (Although ambiguous, these are standard SCSI terms)
  1099.  
  1100. $00   Peripheral Device Type
  1101. FALSE Removable Media
  1102. $00   Device Type Qualifier
  1103. $01   ANSI Version
  1104. $00   Reserved Nibble
  1105. $00   Response Data Format
  1106. $31   Additional Length
  1107. $00   Request Sense Length
  1108. $0000 Reserved Integer
  1109.  
  1110. Block Range: 0 - 84293
  1111. Block Size:  512
  1112.  
  1113.  
  1114. ==================================
  1115. MODE SENSE: CURRENT/CHANGABLE DUMP
  1116. ==================================
  1117. CURRENT    - $0000: 77000008 00000000 00000200 81066003 w............`.
  1118. CHANGEABLE - $0000: 77000008 00000000 00000E00 81067FFF w...........
  1119. CURRENT    - $0010: 00000000 820A0000 00000000 00000000 ...............
  1120. CHANGEABLE - $0010: 00000000 820AFFFF 00000000 00000000 .............
  1121. CURRENT    - $0020: B9063AC0 00000000 200C3838 3133302D 9.:@.... .88130-
  1122. CHANGEABLE - $0020: B9063BCF 00000000 200C0000 00000000 9.;O.... .......
  1123. CURRENT    - $0030: 30313936 4D200316 00040002 00000000 0196M .........
  1124. CHANGEABLE - $0030: 00000000 00000316 00000000 00000000 ...............
  1125. CURRENT    - $0040: 00200200 0001000A 00124000 00000412 . .......@....
  1126. CHANGEABLE - $0040: 00000000 00000000 00000000 00000412 ...............
  1127. CURRENT    - $0050: 00029D04 00000000 00000000 00000000 ...............
  1128. CHANGEABLE - $0050: 00000000 00000000 00000000 00000000 ................
  1129. CURRENT    - $0060: 00003014 4150504C 4520434F 4D505554 ..0APPLE COMPUT
  1130. CHANGEABLE - $0060: 00003014 00000000 00000000 00000000 ..0............
  1131. CURRENT    - $0070: 45522C20 494E4320 00000000 00000000 ER, INC ........
  1132. CHANGEABLE - $0070: 00000000 00000000 00000000 00000000 ................
  1133.  
  1134. EVENTUALLY, IN ADDITION TO THE HEX DUMP, THE MODE SENSE DATA WILL BE PRESENTED
  1135. IN A SIMPLE, HUMAN READABLE FORM!  MANY DEVICES USE MODE SENSE DIFFERENTLY
  1136. MAKING THIS A DIFFICULT TASK.
  1137.  
  1138.  
  1139. =============================================================
  1140. Track-like Seek (Average ms time of many command completions)
  1141. =============================================================
  1142. "Track-like" Sequential:         8.08 ms
  1143. "Track-like" Butterfly:         22.73 ms
  1144. "Track-like" Pattern:           15.07 ms
  1145. "Track-like" Outer To Inner:    42.80 ms
  1146.  
  1147.  
  1148. ============
  1149. SCSI MANAGER
  1150. ============
  1151. (These SCSI Manager timings ignore the Mac OS File System and the SCSI Driver)
  1152. NOTE:  Write tests were disabled by user.
  1153.  
  1154. Maximum Transfer Speeds (KB/Sec): (Same data accessed many times)
  1155.  
  1156.                    READ   WRITE
  1157. 1st Sector        30.17    0.00
  1158. Outer Track      487.93    0.00
  1159. Inner Track      485.98    0.00
  1160. Outer Rings      588.88    0.00 (blocks 0 - 3071, 1.50 MB)
  1161. Inner Rings      604.33    0.00 (blocks 81222 - 84293, 1.50 MB)
  1162.  
  1163. PATTERN DIRECT READ TIMINGS:
  1164.  
  1165.    SYNCHRONOUS, Seed = 1
  1166.             R  E  A  D
  1167.    BYTES  KB/Sec    Seek
  1168.      512   14.92   33.52
  1169.     1024   30.17   16.58
  1170.     2048   57.02    8.77
  1171.     4096  103.43    4.83
  1172.     8192  172.17    2.90
  1173.    16384  281.74    1.77
  1174.    32768  375.65    1.33
  1175.    65536  451.76    1.11
  1176.   131072  517.31    0.97
  1177.   262144  565.89    0.88
  1178.   524288  576.90    0.87
  1179.  
  1180.  
  1181. ===========
  1182. SCSI Driver
  1183. ===========
  1184. NOTE:  Write tests were disabled by user.
  1185.  
  1186. Maximum Transfer Speeds (KB/Sec): (Same data accessed many times)
  1187.  
  1188.    Bytes    READ   WRITE
  1189.      512   30.17    0.00 ("sector")
  1190.    16384  253.88    0.00 ("track")
  1191.  1572864  555.18    0.00 ("rings")
  1192.  
  1193. PATTERN SYNCHRONOUS/ASYNCHRONOUS DATABASE SERVER STYLE READ TIMINGS:
  1194.  
  1195.    SYNCHRONOUS, Seed = 1  ASYNCHRONOUS, Seed = 1
  1196.             R  E  A  D      R  E  A  D
  1197.    BYTES  KB/Sec    Seek  KB/Sec    Seek
  1198.      512   15.33   32.62   15.25   32.79
  1199.     1024   29.50   16.95   29.67   16.85
  1200.     2048   55.38    9.03   56.35    8.87
  1201.     4096  106.23    4.71  104.75    4.77
  1202.     8192  175.74    2.85  177.68    2.81
  1203.    16384  284.84    1.76  274.29    1.82
  1204.    32768  379.78    1.32  379.78    1.32
  1205.    65536  466.74    1.07  474.84    1.05
  1206.   131072  522.72    0.96  522.72    0.96
  1207.   262144  529.66    0.94  529.66    0.94
  1208.   524288  548.57    0.91  543.72    0.92
  1209.  
  1210.  
  1211. ======
  1212. Mac OS
  1213. ======
  1214. (Note that this test cannot be performed on read-only devices such as CD-ROM
  1215.  devices.)
  1216. (Note that file fragmentation and RAM cache can severly influence these 
  1217. speeds.)
  1218.  
  1219. Maximum Transfer Speeds (KB/Sec): (Same data accessed many times)
  1220.  
  1221.             READ   WRITE
  1222. First     415.14  390.51 (1572864 bytes)
  1223. Average   416.07  391.34 (1572864 bytes)
  1224.  
  1225.    Bytes    READ   WRITE
  1226.      512  829.06  518.95 ("sector")
  1227.    16384  107.11  108.39 ("track")
  1228.  1572864  416.07  391.34 ("rings")
  1229.  
  1230. PATTERN SYNCHRONOUS/ASYNCHRONOUS READ/WRITE DATABASE SERVER STYLE TIMINGS:
  1231.  
  1232.              SYNCHRONOUS, Seed = 1           ASYNCHRONOUS, Seed = 1
  1233.             R  E  A  D    W  R  I  T  E     R  E  A  D    W  R  I  T  E
  1234.    BYTES  KB/Sec    Seek  KB/Sec    Seek  KB/Sec    Seek  KB/Sec    Seek
  1235.      512   15.16   32.97   26.26   19.04   15.58   32.09   26.26   19.04
  1236.     1024   30.65   16.31   27.75   18.02   30.83   16.22   27.71   18.05
  1237.     2048   52.75    9.48   29.26   17.09   53.41    9.36   29.36   17.03
  1238.     4096   65.45    7.64   28.45   17.58   97.05    5.15   28.45   17.58
  1239.     8192  161.77    3.09  180.33    2.77  164.42    3.04  180.33    2.77
  1240.    16384  230.82    2.17  234.78    2.13  230.82    2.17  236.07    2.12
  1241.    32768  269.84    1.85  286.41    1.75  271.30    1.84  292.17    1.71
  1242.    65536  335.74    1.49  330.32    1.51  337.58    1.48  328.56    1.52
  1243.   131072  373.62    1.34  363.79    1.37  365.71    1.37  360.00    1.39
  1244.   262144  410.70    1.22  376.47    1.33  406.35    1.23  374.63    1.33
  1245.   524288  477.51    1.05  436.78    1.14  477.51    1.05  438.86    1.14
  1246.  
  1247.  
  1248. [END OF FILE]
  1249.  
  1250.  
  1251. -- 
  1252. ___________________________________________________________
  1253. Matthew Mora                |   my Mac  Matt_Mora@sri.com
  1254. SRI International           |  my unix  mxmora@unix.sri.com
  1255. ___________________________________________________________
  1256.  
  1257.  
  1258.  
  1259. - -------------------------
  1260.  
  1261. From: stevec@Apple.COM (Steve Christensen)
  1262. Subject:  Async filereading only from floppy?
  1263. Date: 15 Feb 92 05:32:14 GMT
  1264. Organization: Apple Computer Inc., Cupertino, CA
  1265.  
  1266. oster@well.sf.ca.us (David Phillip Oster) writes:
  1267. >if you called PBRead on a SCSI device asynchronously, PBRead blocked until the 
  1268. >read was complete, called your completion routine, then returned to its caller.
  1269. >On the other hand, the floppy driver worked correctly: PBRead() returned
  1270. >almost immedialtely, and your completion routine was called by the system
  1271. >some time later, when the data actually arrived.
  1272. >When will this be fixed? It is ludicrous that the original Mac team in '83
  1273. >could write better drivers (the original floppy code) than everyone who has
  1274. >who has come and gone at apple since then.
  1275. >Machines like the Mac FX have a DMA controller chip that could work
  1276. >very nicely with async PBRead()s to move the data without loading the
  1277. >main CPU. The last documentation I saw says that only AUX uses it.
  1278.  
  1279. Making an asynchronous call doesn't mean that the call will, in fact, be
  1280. processed asynchronously.  Various limitations will determine how
  1281. asynchronously a driver can run.  For the floppy driver, much of a request is
  1282. handled that way since many of the operations are so slow (relatively
  1283. speaking).
  1284.  
  1285. SCSI _drivers_ must be completely synchronous because they rely completely
  1286. on the SCSI Manager to talk to their devices, and the SCSI Manager was
  1287. originally implemented in a synchronous fashion.
  1288.  
  1289. Modifying/rewriting the SCSI Manager to make it asynchronous is no small task
  1290. since you have to be completely compatible with the existing SCSI Manager so
  1291. you don't break all the existing SCSI drivers who only know about the
  1292. synchronous calls.  So even though the IIfx has a DMA SCSI controller, the
  1293. DMA mode doesn't do a bit of good if nobody can use it...
  1294.  
  1295. steve
  1296.  
  1297. -- 
  1298. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1299.   Steve Christensen            Never hit a man with glasses.
  1300.   stevec@apple.com            Hit him with a baseball bat.
  1301.  
  1302.  
  1303.  
  1304. - -------------------------
  1305.  
  1306. From: oster@well.sf.ca.us (David Phillip Oster)
  1307. Subject:  Async filereading only from floppy?
  1308. Date: 17 Feb 92 06:11:38 GMT
  1309. Organization: Whole Earth 'Lectronic Link, Sausalito, CA
  1310.  
  1311. In article <62825@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes:
  1312. >Modifying/rewriting the SCSI Manager to make it asynchronous is no small task
  1313. >since you have to be completely compatible with the existing SCSI Manager so
  1314. >you don't break all the existing SCSI drivers who only know about the
  1315. >synchronous calls.  
  1316.  
  1317. Yes, it isn't a small job, but it is an important job, and its time for
  1318. Apple to get off its ass and do it. Call it SCSI++, and let the drivers be
  1319. incompatible until the manufacturers do an upgrade. Apple does things that
  1320. way all the time. I'm tired of having to deliver slow file i/o to my customers
  1321. because my application can't process while it is waiting for the disk. This
  1322. is something that Apple needs to change!
  1323. -- 
  1324. -- David Phillip Oster - At least the government doesn't make death worse.
  1325. -- oster@well.sf.ca.us = {backbone}!well!oster
  1326.  
  1327.  
  1328.  
  1329. - -------------------------
  1330.  
  1331. From: d88-jwa@hemul.nada.kth.se (Jon W{tte)
  1332. Subject:  Async filereading only from floppy?
  1333. Date: 17 Feb 92 12:33:22 GMT
  1334. Organization: Royal Institute of Technology, Stockholm, Sweden
  1335.  
  1336. .us> oster@well.sf.ca.us (David Phillip Oster) writes:
  1337.  
  1338.    Yes, it isn't a small job, but it is an important job, and its time for
  1339.    Apple to get off its ass and do it. Call it SCSI++, and let the drivers be
  1340.  
  1341. I believe that's one of the things scheduled for 7.0 but postponed
  1342. because of time constraints. It's on the works (since a long time)
  1343. under the name of the "New SCSI Manager."
  1344.  
  1345. --
  1346. This Signature is distributed under the conditions of the Signature License,
  1347. available at a fee from   h+@nada.kth.se  (Jon W{tte)  Reading the Signature
  1348. implies that you accept to be bound by the terms in said License. Should you
  1349. not agree on any of these terms, you must return the Signature unread to me.
  1350.  
  1351.  
  1352.  
  1353. - -------------------------
  1354.  
  1355. From: jimc@isc-br.ISC-BR.COM (Jim Cathey)
  1356. Subject:  Async filereading only from floppy?
  1357. Date: 18 Feb 92 01:40:11 GMT
  1358. Organization: ISC-Bunker Ramo, An Olivetti Company
  1359.  
  1360. In article <62825@apple.Apple.COM> stevec@Apple.COM (Steve Christensen) writes:
  1361. >SCSI _drivers_ must be completely synchronous because they rely completely
  1362. >on the SCSI Manager to talk to their devices, and the SCSI Manager was
  1363. >originally implemented in a synchronous fashion.
  1364.  
  1365. So how do we shoot the fool that made this stupid decision in the first
  1366. place?  I mean, the original Mac OS was well designed for squeezing the
  1367. maximum amount of performance out of the box.  Overlapping I/O out the
  1368. ying-yang.  I guess SCSI was so nice and fast (comparatively) that
  1369. whoever it was just decided it wasn't worth the bother to do the job
  1370. right.  Maybe he was used to the PC...
  1371.  
  1372. As you can tell, I've been annoyed about this from day one.  It is long
  1373. past time that this, umm, 'feature' was rectified.
  1374.  
  1375. +----------------+
  1376. ! II      CCCCCC !  Jim Cathey
  1377. ! II  SSSSCC     !  ISC-Bunker Ramo
  1378. ! II      CC     !  TAF-C8;  Spokane, WA  99220
  1379. ! IISSSS  CC     !  UUCP: uunet!isc-br!jimc (jimc@isc-br.isc-br.com)
  1380. ! II      CCCCCC !  (509) 927-5757
  1381. +----------------+
  1382.             "PC's --- the junk bonds of the computer industry"
  1383.  
  1384.  
  1385.  
  1386. - -------------------------
  1387.  
  1388. From: sr0o+@andrew.cmu.edu (Steven Ritter)
  1389. Subject:  Async filereading only from floppy?
  1390. Date: 18 Feb 92 01:36:48 GMT
  1391. Organization: Doctoral student, Psychology, Carnegie Mellon, Pittsburgh, PA
  1392.  
  1393. >Yes, it isn't a small job, but it is an important job, and its time for
  1394. >Apple to get off its ass and do it. Call it SCSI++, and let the drivers be
  1395. >incompatible until the manufacturers do an upgrade. Apple does things that
  1396. >way all the time. I'm tired of having to deliver slow file i/o to my customers
  1397. >because my application can't process while it is waiting for the disk. This
  1398. >is something that Apple needs to change!
  1399. >-- 
  1400. >-- David Phillip Oster - At least the government doesn't make death worse.
  1401. >-- oster@well.sf.ca.us = {backbone}!well!oster
  1402.  
  1403.  
  1404. Yeah!  What he said.
  1405.  
  1406. Steve
  1407.  
  1408.  
  1409.  
  1410. - -------------------------
  1411.  
  1412. From: ksand@apple.com (Kent Sandvik)
  1413. Subject:  Async filereading only from floppy?
  1414. Date: 14 Feb 92 07:45:44 GMT
  1415. Organization: MacDTS Mongols
  1416.  
  1417. In article <29996@well.sf.ca.us>, oster@well.sf.ca.us (David Phillip Oster) writes:
  1418. > Machines like the Mac FX have a DMA controller chip that could work
  1419. > very nicely with async PBRead()s to move the data without loading the
  1420. > main CPU. The last documentation I saw says that only AUX uses it.
  1421.  
  1422. N.B fx is the only Macintosh that has the DMA controller chip. However
  1423. I'm not implying that DMA is a bad thing, quite the opposite.
  1424.  
  1425. > You read the article on "Futures" in the Summer '91 issue of Develop
  1426. > magazine I want to be able to use the same techniques with reading
  1427. > disk files: i.e., I want to schedule a read as early as possible, and keep
  1428. > processing, to overlap processing with disk i/o, only blocking on the disk
  1429. > when there isn't anything else to do.
  1430.  
  1431. Yep, you need a File Manager and a SCSI Manager which is fully asynchronous :-).
  1432.  
  1433. Kent Sandvik/DTS
  1434.  
  1435.  
  1436.  
  1437. ---------------------------
  1438.  
  1439. End of C.S.M.P. Digest
  1440. **********************
  1441.